Remove GtkRange::activate-slider
authorMatthias Clasen <mclasen@redhat.com>
Thu, 2 Sep 2010 02:09:44 +0000 (22:09 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 2 Sep 2010 02:09:44 +0000 (22:09 -0400)
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.

gtk/gtkrange.c

index e24d2f232ac18eadd94cf8ffd01c25ce5380f845..27fa34b4a5f2a7bed7e12fa4a931cf180bad1671 100644 (file)
@@ -559,13 +559,6 @@ gtk_range_class_init (GtkRangeClass *class)
                                                             0,
                                                             GTK_PARAM_READABLE));
 
-  gtk_widget_class_install_style_property (widget_class,
-                                          g_param_spec_boolean ("activate-slider",
-                                                                 P_("Draw slider ACTIVE during drag"),
-                                                                P_("With this option set to TRUE, sliders will be drawn ACTIVE and with shadow IN while they are dragged"),
-                                                                FALSE,
-                                                                GTK_PARAM_READABLE));
-
   /**
    * GtkRange:trough-under-steppers:
    *
@@ -2116,15 +2109,8 @@ gtk_range_expose (GtkWidget      *widget,
 
   if (priv->grab_location == MOUSE_SLIDER)
     {
-      gboolean activate_slider;
-
-      gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL);
-
-      if (activate_slider)
-        {
-          state = GTK_STATE_ACTIVE;
-          shadow_type = GTK_SHADOW_IN;
-        }
+      state = GTK_STATE_ACTIVE;
+      shadow_type = GTK_SHADOW_IN;
     }
 
   if (gdk_rectangle_intersect (&expose_area,
@@ -2444,7 +2430,6 @@ gtk_range_button_press (GtkWidget      *widget,
            priv->mouse_location == MOUSE_SLIDER)
     {
       gboolean need_value_update = FALSE;
-      gboolean activate_slider;
 
       /* Any button can be used to drag the slider, but you can start
        * dragging the slider with a trough click using button 2;
@@ -2493,13 +2478,7 @@ gtk_range_button_press (GtkWidget      *widget,
 
       range_grab_add (range, device, MOUSE_SLIDER, event->button);
 
-      gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL);
-
-      /* force a redraw, if the active slider is drawn differently to the
-       * prelight one
-       */
-      if (activate_slider)
-        gtk_widget_queue_draw (widget);
+      gtk_widget_queue_draw (widget);
 
       if (need_value_update)
         update_slider_position (range, event->x, event->y);